package microcredit.gui.editor.loan;

import microcredit.gui.base.EnumComboBox;
import microcredit.model.domain.LoanExtensionReason;

public class ExtensionReasonCombobox extends EnumComboBox<LoanExtensionReason> {

	public ExtensionReasonCombobox() {
		super(LoanExtensionReason.values(), true);
	}
	
	@Override
	public boolean isFiltered(LoanExtensionReason enumValue) {
		if (enumValue == LoanExtensionReason.D) {
			return true;
		}
		return super.isFiltered(enumValue);
	}
	
	@Override
	public String convertToString(LoanExtensionReason enumValue) {
		if (enumValue == null) {
			return "<< Please select >>";
		}
		return enumValue.toString();
	}

}
